<?php echo form_open('report/stafftraining', array('class'=>'form-search'));?>
  <div class="input-append">
    <?php 
    $data = array(''=>'Select Training Type', 0=>'Received', 1=>'Planing');
    echo form_dropdown('RTType',$data);
    ?>
    <button type="submit" class="btn">Search</button>
  </div>
<?php echo form_close();?>
<?php 
if (count($training)){
?>
<table class="table table-bordered table-striped table-hover staff-profile">
  <caption><h4><?php echo $title;?></h4></caption>
   <thead>
	    <tr>
	    	<th>Name</th>
            <th>Training Class</th>
            <th>Training Type</th>
            <th>Training Date</th>
            <th>Quater Plan</th>
            <th>Topic</th>
            <th>Duration</th>
            <th>Comment</th>
	    </tr>
	</thead>
  <tbody>
  	<?php 
		foreach ($training as $key => $list){
			echo "<tr valign='top'>\n";
			echo "<td>".$list['FirstName']." ".$list['LastName']."</td>\n";
            echo "<td>".$list['TrainingClass']."</td>\n";
            echo "<td>";
            echo $list['RTType']==1 ? 'Planing' : 'Received';
            echo "</td>\n";
            echo "<td>".substr($list['DateRTraining'], 0, 10)."</td>\n";
            echo "<td>".$list['QuaterPlan']."</td>\n";
            echo "<td>".$list['Topic']."</td>\n";
            echo "<td>".$list['Duration']."</td>\n";
            echo "<td>".$list['Comment']."</td>\n";
			echo "</tr>\n";
		}
  	?>
  </tbody>
</table>
<?php }?>